<html lang="zh-cnm-Hans">
<head>
    <meta charset="utf-8"/>
    <title>Go 路由功能测试数据</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="generator" content="https://github.com/caixw/go-http-routers-testing"/>
    <meta name="author" content="https://caixw.io"/>
    <meta name="keywords" content="go,golang,benchmark,testing,route,routes,router,mux"/>
    <meta name="description" content="Google Go 路由的性能测试工具。"/>
    <link rel="icon" href="./favicon.ico"/>
    <link href="./style.css" type="text/css" rel="stylesheet"/>
    <script src="./sortable.js"></script>
</head>

<body>
<article>
    <h1>Go 路由功能测试数据</h1>

    <p>数据根据测试环境的不同，会有不同的呈现，仅可作为参考用。</p>

    <section id="env">
        <h3><a href="#env" class="anchor">#</a>测试环境</h3>
        <ul>
            <li>系统: darwin</li>
            <li>架构: amd64</li>
            <li>CPU: 4 核</li>
            <li>版本: go1.22.0</li>
        </ul>
    </section><section id="all" data-file="data/all.json">
        <h3><a href="#all" class="anchor">#</a>所有(964)</h3>
        <p>所有接口混合测试</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="3567">3567</td>
                    <td data-sort="2062">2062</td>
                    <td data-sort="18">18</td>
                    <td data-sort="709232">692.61 ⚡️️</td>
                    <td><a href="miss.html?all_dimfeld-httptreemux-v5.json">2</a></td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="3665">3665</td>
                    <td data-sort="2190">2190</td>
                    <td data-sort="20">20</td>
                    <td data-sort="4802144">4689.59</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="55578">55578</td>
                    <td data-sort="2736">2736</td>
                    <td data-sort="21">21</td>
                    <td data-sort="22864480">22328.59</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="3451">3451 ⚡️️</td>
                    <td data-sort="1909">1909 ⚡️️</td>
                    <td data-sort="16">16 ⚡️️</td>
                    <td data-sort="13529656">13212.55</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="twitter" data-file="data/twitter.json">
        <h3><a href="#twitter" class="anchor">#</a>Twitter API(128)</h3>
        <p>采集自 Twitter 的 API，以静态路由为主。</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="2258">2258</td>
                    <td data-sort="1571">1571 ⚡️️</td>
                    <td data-sort="14">14</td>
                    <td data-sort="39744">38.81 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="1444">1444 ⚡️️</td>
                    <td data-sort="1692">1692</td>
                    <td data-sort="7">7 ⚡️️</td>
                    <td data-sort="47600">46.48</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="6659">6659</td>
                    <td data-sort="2372">2372</td>
                    <td data-sort="21">21</td>
                    <td data-sort="819688">800.48</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="2708">2708</td>
                    <td data-sort="1875">1875</td>
                    <td data-sort="16">16</td>
                    <td data-sort="270688">264.34</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="long" data-file="data/long.json">
        <h3><a href="#long" class="anchor">#</a>Long Routes(16)</h3>
        <p>路径很长的路由项</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="4229">4229</td>
                    <td data-sort="2498">2498</td>
                    <td data-sort="17">17</td>
                    <td data-sort="7936">7.75 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="3085">3085 ⚡️️</td>
                    <td data-sort="2705">2705</td>
                    <td data-sort="15">15 ⚡️️</td>
                    <td data-sort="48560">47.42</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="10489">10489</td>
                    <td data-sort="3250">3250</td>
                    <td data-sort="22">22</td>
                    <td data-sort="676704">660.84</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="4309">4309</td>
                    <td data-sort="2462">2462 ⚡️️</td>
                    <td data-sort="16">16</td>
                    <td data-sort="21312">20.81</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="github" data-file="data/github.json">
        <h3><a href="#github" class="anchor">#</a>Github API(348)</h3>
        <p>模仿 Github 的 API 定义，数量中等、命名合理，符合一般情况下的需求。</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="2849">2849</td>
                    <td data-sort="1902">1902</td>
                    <td data-sort="17">17</td>
                    <td data-sort="114128">111.45 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="2116">2116 ⚡️️</td>
                    <td data-sort="1917">1917</td>
                    <td data-sort="14">14 ⚡️️</td>
                    <td data-sort="297752">290.77</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="31093">31093</td>
                    <td data-sort="2649">2649</td>
                    <td data-sort="21">21</td>
                    <td data-sort="5402488">5275.87</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="3289">3289</td>
                    <td data-sort="1897">1897 ⚡️️</td>
                    <td data-sort="16">16</td>
                    <td data-sort="1879656">1835.60</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="discuz" data-file="data/discuz.json">
        <h3><a href="#discuz" class="anchor">#</a>Discuz Routes(2)</h3>
        <p>DZ 风格的路由定义</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="1994">1994 ⚡️️</td>
                    <td data-sort="1560">1560 ⚡️️</td>
                    <td data-sort="15">15 ⚡️️</td>
                    <td data-sort="0">0.00 ⚡️️</td>
                    <td><a href="miss.html?discuz_dimfeld-httptreemux-v5.json">2</a></td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="3546">3546</td>
                    <td data-sort="2070">2070</td>
                    <td data-sort="20">20</td>
                    <td data-sort="7280">7.11</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="6349">6349</td>
                    <td data-sort="2674">2674</td>
                    <td data-sort="22">22</td>
                    <td data-sort="0">0.00 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="2636">2636</td>
                    <td data-sort="1880">1880</td>
                    <td data-sort="16">16</td>
                    <td data-sort="0">0.00 ⚡️️</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="5-params" data-file="data/5-params.json">
        <h3><a href="#5-params" class="anchor">#</a>5 Params(200)</h3>
        <p>五个参数的路由</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="3532">3532</td>
                    <td data-sort="2160">2160</td>
                    <td data-sort="20">20</td>
                    <td data-sort="203600">198.83 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="3719">3719</td>
                    <td data-sort="2502">2502</td>
                    <td data-sort="29">29</td>
                    <td data-sort="1735872">1695.19</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="27481">27481</td>
                    <td data-sort="2763">2763</td>
                    <td data-sort="22">22</td>
                    <td data-sort="6192760">6047.62</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="3107">3107 ⚡️️</td>
                    <td data-sort="1920">1920 ⚡️️</td>
                    <td data-sort="16">16 ⚡️️</td>
                    <td data-sort="883904">863.19</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="2-params" data-file="data/2-params.json">
        <h3><a href="#2-params" class="anchor">#</a>2 Params(150)</h3>
        <p>两个参数的路由</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="2563">2563</td>
                    <td data-sort="1904">1904</td>
                    <td data-sort="18">18</td>
                    <td data-sort="28496">27.83 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="2392">2392 ⚡️️</td>
                    <td data-sort="1886">1886</td>
                    <td data-sort="18">18</td>
                    <td data-sort="880144">859.52</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="15574">15574</td>
                    <td data-sort="2649">2649</td>
                    <td data-sort="22">22</td>
                    <td data-sort="1986784">1940.22</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="2552">2552</td>
                    <td data-sort="1856">1856 ⚡️️</td>
                    <td data-sort="16">16 ⚡️️</td>
                    <td data-sort="361808">353.33</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section><section id="10-params" data-file="data/10-params.json">
        <h3><a href="#10-params" class="anchor">#</a>10 Params(120)</h3>
        <p>十个参数的路由</p>
        <table class="sortable">
            <thead>
                <tr>
                    <th>路由</th>
                    <th>ns/op</th>
                    <th>B/op</th>
                    <th>allocs/op</th>
                    <th>内存(KB)</th>
                    <th class="no-sort">未命中</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td data-sort="dimfeld-httptreemux-v5"><a href="https://github.com/dimfeld/httptreemux">dimfeld-httptreemux/v5</a></td>
                    <td data-sort="4887">4887</td>
                    <td data-sort="3030">3030</td>
                    <td data-sort="22">22</td>
                    <td data-sort="213840">208.83 ⚡️️</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="fasthttp-router"><a href="https://github.com/fasthttp/router">fasthttp-router</a></td>
                    <td data-sort="5329">5329</td>
                    <td data-sort="3266">3266</td>
                    <td data-sort="45">45</td>
                    <td data-sort="1322016">1291.03</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="gorilla-mux"><a href="https://github.com/gorilla/mux">gorilla-mux</a></td>
                    <td data-sort="24171">24171</td>
                    <td data-sort="3460">3460</td>
                    <td data-sort="23">23</td>
                    <td data-sort="6857744">6697.02</td>
                    <td>无</td>
                </tr>
                <tr>
                    <td data-sort="issue9-mux-v7"><a href="https://github.com/issue9/mux">issue9-mux/v7</a></td>
                    <td data-sort="3646">3646 ⚡️️</td>
                    <td data-sort="1952">1952 ⚡️️</td>
                    <td data-sort="16">16 ⚡️️</td>
                    <td data-sort="1460640">1426.41</td>
                    <td>无</td>
                </tr>
            </tbody>
        </table>
    </section></article>

<footer>
    <p>&copy; 2017-2024 by
        <a href="https://caixw.io">caixw</a> &middot;
        <a href="https://github.com/caixw/go-http-routers-testing">Github</a>
    </p>
    <p>
        用到的第三方库：
        <a href="https://github.com/tofsjonas/sortable">表格排序</a>
    </p>
</footer>

</body>
</html>